package io.renren.service;

import io.renren.common.utils.PageUtils;
import io.renren.entity.MemberMachineEntity;

import java.util.Map;

import com.baomidou.mybatisplus.service.IService;

/**
 * 用户矿机表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-04-14 14:11:21
 */
public interface MemberMachineService extends IService<MemberMachineEntity> {

	PageUtils queryPage(Map<String, Object> params);

	/**
	 * 购买矿机
	 * 
	 * @param userId
	 * @param machineId
	 */
	void buy(Long userId, Long machineId);

	/**
	 * 查询会员算力
	 * 
	 * @param id
	 * @return
	 */
	Double totalHashSecond(Long id);

	/**
	 * 个人每日收益
	 * 
	 * @param id
	 * @return
	 */
	Double totalPerDayProfit(Long id);

	/**
	 * 领取收益
	 * 
	 * @param userId
	 *            会员ID
	 * @param mmId
	 *            会员矿机Id
	 */
	void getProfit(Long userId, Long mmId);
}
